import 'package:fzcgx_app/ui/base/base_view_model.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';

class OrderRobViewModel extends BaseViewModel{
   RefreshController refreshController =
      RefreshController(initialRefresh: false);
  OrderRobViewModel(){
    this.setState(ViewState.Success);
  }
  void onRefresh() async{
    // monitor network fetch
    await Future.delayed(Duration(milliseconds: 1000));
    // if failed,use refreshFailed()
    refreshController.refreshCompleted();
  }
  void onLoading() async{
    // monitor network fetch
    await Future.delayed(Duration(milliseconds: 1000));
    // if failed,use loadFailed(),if no data return,use LoadNodata()
   
    
    refreshController.loadComplete();
  }
}